#include<stdio.h>
int main()
{
	int number,nu=0,sum=0,t=0;
	scanf("%d",&number);
	if(number<0)
	{
		printf("N,");
		t=1;
	}
	else
	{
		printf("P,");
	}
	switch (t){
		case 0:
			number*=1;
			break;
		case 1:
			number*=-1;
			break;
	} 
	while(number!=0)
	{

		nu=number%10;
		sum+=nu;
		number/=10;
	}
	printf("%d",sum);
	return 0;
}
